@REM -- InstallWindowsService.bat
@REM --
@REM -- To run HomeUX.MusicServer as a Windows service (instead of a trap application):
@REM --   1. In the .config file, do this in <appSettings>:
@REM --        <add key="RunAsWindowsService" value="true"/>
@REM --   2. Run this batch file to install the services.
@REM --   3. In the Services tool (e.g. run services.msc):
@REM --        (a) Change the HomeUX.MusicServer service to run under whichever user owns the Windows
@REM --            Media Player library.  (If you don't do this, the service will run under a
@REM --            system account that will have no albums.)
@REM --        (b) Start the service.
@REM --
CALL ..\Misc\Elevate.bat sc create HomeUX.MusicServer start= auto binPath= %~dp0bin\Debug\HomeUX.MusicServer.exe
